using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.Util;

namespace Moogle
{
    /// <summary>
    /// Remind activity class.  This activity functions as an entry point for the application's "Remind" functions. 
    /// It's target consumer is the Program class.
    /// </summary>
    [Activity(Label = "Remind", MainLauncher = false, Icon = "@drawable/icon", Theme = "@android:style/Theme.Holo.Light.Dialog", NoHistory = true)]
    [IntentFilter(new[] { Intent.ActionMain })]
    public class ActivityRemind : Activity
    {
        #region Local Memory
        /// <summary>
        /// Constant using to identify (filter) entries created in the
        /// Android Log by this class.
        /// </summary>
        private const string C_TAG = "ActivityRemind";
        private Button __M_buttonPop;
        private Button __M_buttonFill;
        private Button __M_buttonCancel;
        #endregion
        #region OnCreate Control Function
        /// <summary>
        /// Class (or Activity) entry point.
        /// </summary>
        /// <param name="bundle">Android.OS.Bundle object instance that can be used to pass data to activity at startup.</param>
        protected override void OnCreate(Bundle bundle)
        {

            base.OnCreate(bundle);

            Log.Info(C_TAG, "OnCreate started.");

            try
            {
                /// Load the activities layout 
                this.SetContentView(Resource.Layout.remind);

                /// capture our View elements and click event handlers
                this.__M_buttonFill = (Button)this.FindViewById(Resource.Id.buttonShowFillRemind);
                this.__M_buttonPop = (Button)this.FindViewById(Resource.Id.buttonShowPopRemind);
                this.__M_buttonCancel = (Button)this.FindViewById(Resource.Id.buttonCancel);

                /// add a click Show fill button click event delegate        
                this.__M_buttonFill.Click += delegate
                {
                    var _IntentShow = new Intent(this, typeof(ActivityFillRemind));
                    StartActivity(_IntentShow);
                }; // end delegate

                /// add a click Show pop button click event delegate        
                this.__M_buttonPop.Click += delegate
                {
                    var _IntentShow = new Intent(this, typeof(ActivityPopRemind));
                    StartActivity(_IntentShow);
                }; // end delegate
                /// add a click Show pop button click event delegate        
                this.__M_buttonCancel.Click += delegate
                {
                    var _IntentShow = new Intent(this, typeof(Program));
                    StartActivity(_IntentShow);
                }; // end delegate
            } // end try
            catch (SystemException err)
            {
                Log.Error(C_TAG, err.Message);
            } // end catch
            finally
            {
                Log.Info(C_TAG, "OnCreate ended.");
            } // end finally
        }
        #endregion
    }
}